package models;
import java.util.*;

import javax.persistence.Entity;
@Entity
public class AddingAttachment extends BaseModel{
	
	public String name; //附件名称
	public String path; //附件路径
	public Date upload;	//上传时间
	public Long fid; //Id
	
	public AddingAttachment() {
		
	}
	
	public AddingAttachment(String name,String path,Long fid) {
		this.name = name;		
		this.path = path;
		this.fid = fid;
		this.upload = new Date();
	}
	
	public static List<AddingAttachment> findAttachments(Long fid){
		return find("fid = ?",fid).fetch();
	}
}

